set Text Variation Axes
Sets the variation axis values of a grapheme range, such as wdth for the width of a variable font.
The list replaces the axis values that the range had, and an empty list removes them. When a tag repeats, the last entry wins. An axis without a value keeps the value that the font file and the font weight and style select. A wght entry overrides the font weight with any value, such as 450, and setTextFontWeight does not remove it. An ital or slnt entry overrides the font style in the same way, and setTextFontStyle does not remove it either. The font clamps a value to the range of its axis, and an axis that the font does not have changes nothing. Values keep three decimals. EditorApi.getFontInfo lists the axes of a font. Required scope: "text/character"
Parameters
the text block whose axis values should be changed.
the axis values. Each tag has four ASCII characters.
the start index of the grapheme range. Negative falls back to the current cursor/selection start when editing, or the start of the entire text otherwise.
the grapheme index after the last grapheme. Negative falls back to the current cursor/selection end when editing, or the end of the entire text otherwise.
Throws
with the code BLOCK.TEXT_INVALID_OPENTYPE_TAG when a tag is not four ASCII characters, BLOCK.TEXT_INVALID_VARIATION_AXIS_VALUE when a value is not finite, and BLOCK.TEXT_TOO_MANY_OPENTYPE_SETTINGS when the list has more than 64 entries.